import '../../models/index.dart';

import '../models/index.dart';
import '../tools/eg_tools.dart';

class DetailVm {
  List<ImageNormalModel> imageList = [];

  // 配置详情页图片列表
  configDetailImageModelList({
    required TuChongItem tuChongItem,
    double? width,
  }) {
    imageList = List<ImageNormalModel>.from(
      tuChongItem.images!.map(
        (e) => configImageNormalModel(
          imageUrl: e.imageUrl,
          width: width,
          imgWidth: e.width?.toDouble(),
          imgHeight: e.height?.toDouble(),
        ),
      ),
    );
  }
}
